<?php

    header("Content-type:text/html;charset=utf-8");
    $username = isset($_POST['username']) ? $_POST['username'] : ''; // 2-4位 string
    $pwd = isset($_POST['pwd']) ? $_POST['pwd'] : '';  // 32位MD5 string
    $time = time();
    // 验证

    // 连接数据库

    //判断是否出错

    // 写sql语句 insert入库

    // 创建session

    $data = ['code'=>0,'msg'=>'ok'];
    $res = json_encode($data,JSON_UNESCAPED_UNICODE);
    echo $res;exit;
